-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(python): Add sentry_logs_level option to Loguru, logging integration
#14015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Bundle ReportChanges will decrease total bundle size by 15 bytes (-0.0%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-client-array-pushAssets Changed:
view changes for bundle: sentry-docs-server-cjsAssets Changed:
|
sentry_logs_level option to Loguru, logging integration
szokeasaurusrex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding! Please address my suggestions before merging, otherwise lgtm (I can also do a second pass review after your changes if you'd like, please lmk)
| level=logging.INFO, # Capture INFO and above as breadcrumbs | ||
| event_level=logging.INFO, # Send INFO records as events | ||
| sentry_logs_level=logging.WARNING, # Capture WARNING and above as logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest setting these to more realistic levels; specifically, it seems unrealistic to me that someone would want their event_level below the sentry_logs_level
Maybe set level to debug, event_level to warning, and sentry_logs_level also to debug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, alternatively, it might be helpful to just demonstrate setting each of the levels to their respective defaults; that way, folks are not confused into thinking that these values are the default values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to default values
Co-authored-by: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com>
DESCRIBE YOUR PR
Since we started supporting Sentry logs via the logging integration (and more recently Loguru), we haven't added the new
sentry_logs_leveloption used to fine-tune which logs should be captured. Adding it here.Direct links to preview:
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
LEGAL BOILERPLATE
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
EXTRA RESOURCES